﻿package com.javaPattern.ObserverJDK;

public class Client {
	public static void main(String[] args) {
		Children child = new Children();

		// 添加观察者对象
		child.addObserver(new Mother());
		child.addObserver(new Father());

		// 触发通知事件
		child.setState("fright");
		child.setState("scholarship");
	}
}
